file = {
    SOI ~
    (record ~ record_end)* ~ record? ~
    EOI
}

record = {
    field ~ (field_separator ~ field)*
}

record_end = {
    "\n" | "\r\n"
}

field = {
    number
}

field_separator = {
    ","
}

number = {
    (algebraic_sign? ~ ASCII_DIGIT+ ~ decimal_dot ~ ASCII_DIGIT+) |
    (algebraic_sign ~ ASCII_DIGIT+) |
    (algebraic_sign? ~ decimal_dot ~ ASCII_DIGIT+) |
    ASCII_DIGIT+
}

algebraic_sign = {
    ("-" | "+")
}

decimal_dot = {
    "."
}
